﻿@model EditForumTopicModel
@using Nop.Web.Models.Boards;
@using (Html.BeginForm())
{
    <div class="page forum-edit-page">
        <div class="page-title">
            @if (Model.IsEdit)
            {
                <h1>@T("Forum.EditTopic") - @Model.Subject</h1>
            }
            else
            {
                <h1>@T("Forum.NewTopic")</h1>
            }
        </div>
        <div class="page-body">
            <div class="message-error">
                @Html.ValidationSummary(true)
            </div>
            @Html.HiddenFor(model => model.Id)
            @Html.HiddenFor(model => model.ForumId)
            <div class="post-topic">
                <div>
                    @T("Forum.ForumName"): @Model.ForumName
                </div>
                <div>
                    @T("Forum.TopicTitle"):
                </div>
                <div>
                    @Html.TextBoxFor(model => model.Subject)
                    @Html.ValidationMessageFor(model => model.Subject)
                </div>
                <div>
                    @Html.TextAreaFor(model => model.Text)
                    @Html.ValidationMessageFor(model => model.Text)
                </div>
                @if (Model.IsCustomerAllowedToSetTopicPriority)
                {
                    <div>
                        @Html.DropDownList("TopicTypeId", new SelectList(Model.TopicPriorities, "Value", "Text", Model.TopicTypeId))
                    </div>
                }
                @if (Model.IsCustomerAllowedToSubscribe)
                {
                    <div>
                        @Html.EditorFor(model => model.Subscribed)
                        @Html.LabelFor(model => model.Subscribed, T("Forum.NotifyWhenSomeonePostsInThisTopic").Text)
                    </div>
                }
                <div class="options">
                    <input type="submit" value="@T("Forum.Submit")" data-inline="true"  />
                    <a href="@Url.RouteUrl("ForumSlug", new { id = Model.ForumId, slug = Model.ForumSeName })" data-inline="true" data-role="button">@T("Forum.Cancel")</a>
                </div>
            </div>
        </div>
    </div>
}
